class {
    onInput() {
        this.state = { count: 0 };
    }
}

<div>${state.count}</div>
-- [${state.count}]
